#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;
int main()
{
	char arr[15];
	cin.get(arr, 14);
	int i = 1; int sum = 0;
	int rem;
	for (rem = 0; i <= 9; i++) {
		if (arr[rem] == '-') rem++;
		sum += (arr[rem++] - '0') * i;
	}
	rem++; sum %= 11; 
	if (sum == 10)sum = 'X';
	if (arr[rem] - '0' == sum|| (arr[rem] == 'X' && sum == 'X')) {
		cout << "Right";
	}
	else if (arr[rem] != 'X' && sum == 'X') {
		arr[rem] = 'X';
		cout << arr;
	}
	else {
		arr[rem] = sum + '0';
		cout << arr;
	}
	return 0;
}